-
Notifications
You must be signed in to change notification settings - Fork 650
Upgrade project to prisma v6 #568
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: me <[email protected]>
|
Cursor Agent can help with this pull request. Just |
|
Caution Review failedThe pull request is closed. Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughUpgrades Prisma to v6 with engineType "library", adds an adapter-based better-sqlite3 configuration (validated via DATABASE_URL), adds prisma.config.ts and generated client output, updates imports to the generated Prisma client, changes WebAuthn registration to store Changes
Sequence Diagram(s)sequenceDiagram
participant Browser
participant Server
participant PrismaClient
rect rgb(220,235,255)
Browser->>Server: POST /webauthn/verify-registration (credential)
Server->>Server: Convert credential.publicKey -> Uint8Array
Server->>PrismaClient: create passkey({ publicKey: Uint8Array, ... })
PrismaClient-->>Server: insert result
Server-->>Browser: 200 OK
end
rect rgb(235,245,220)
note right of PrismaClient: PrismaClient initialized with\nPrismaBetterSQLite3 adapter (DATABASE_URL)\nGenerated client uses engineType="library"
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related issues
Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (12)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR upgrades Prisma from v5 to v6 and integrates the Better SQLite3 driver adapter to improve compatibility and reduce binary size.
- Prisma client and CLI upgraded from v5.14.0 to v6.16.3
- Added Better SQLite3 adapter integration with required dependencies
- Updated Prisma configuration to use library engine type and new adapter
Reviewed Changes
Copilot reviewed 4 out of 7 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| prisma/schema.prisma | Added engineType configuration for library mode |
| package.json | Upgraded Prisma packages and added Better SQLite3 dependencies |
| app/utils/prisma.server.ts | Integrated Better SQLite3 adapter in Prisma client configuration |
| app/routes/resources+/webauthn+/verify-registration.ts | Updated buffer handling for compatibility with new Prisma version |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: me <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (3)
cache.dbis excluded by!**/*.dbpackage-lock.jsonis excluded by!**/package-lock.jsonprisma/dev.dbis excluded by!**/*.db
📒 Files selected for processing (4)
app/routes/resources+/webauthn+/verify-registration.ts(1 hunks)app/utils/prisma.server.ts(2 hunks)package.json(4 hunks)prisma/schema.prisma(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Cursor Bugbot
- GitHub Check: 🎭 Playwright
kentcdodds
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cursor, I don't think we need the prisma/dev.db or cache.db files committed to the repo. Could you remove those please?
Co-authored-by: me <[email protected]>
Co-authored-by: me <[email protected]>
|
@cursor, I think this would be a good time to also migrate to the prisma config. Below are the docs from prisma for this https://www.prisma.io/docs/orm/reference/prisma-config-referencetitle: "Prisma Config reference"
|
| Property | Type | Required | Default |
|---|---|---|---|
schema |
string |
No | ./prisma/schema.prisma and ./schema.prisma |
adapter
A function that returns a Prisma driver adapter instance which is used by the Prisma CLI to run migrations. The function should return a Promise that resolves to a valid Prisma driver adapter.
| Property | Type | Required | Default |
|---|---|---|---|
adapter |
() => Promise<SqlMigrationAwareDriverAdapterFactory> |
No | none |
Example using the Prisma ORM D1 driver adapter:
import path from "node:path";
import type { PrismaConfig } from "prisma";
import { PrismaD1 } from "@prisma/adapter-d1";
// import your .env file
import "dotenv/config";
export default {
experimental: {
adapter: true
},
schema: path.join("prisma", "schema.prisma"),
async adapter() {
return new PrismaD1({
CLOUDFLARE_D1_TOKEN: process.env.CLOUDFLARE_D1_TOKEN,
CLOUDFLARE_ACCOUNT_ID: process.env.CLOUDFLARE_ACCOUNT_ID,
CLOUDFLARE_DATABASE_ID: process.env.CLOUDFLARE_DATABASE_ID,
});
},
} satisfies PrismaConfig;:::note
As of Prisma ORM v6.11.0, the D1 adapter has been renamed from PrismaD1HTTP to PrismaD1.
:::
studio
Configures how Prisma Studio connects to your database. See sub-options below for details.
| Property | Type | Required | Default |
|---|---|---|---|
studio |
object |
No | none |
studio.adapter
A function that returns a Prisma driver adapter instance. The function receives an env parameter containing environment variables and should return a Promise that resolves to a valid Prisma driver adapter.
| Property | Type | Required | Default |
|---|---|---|---|
studio.adapter |
(env: Env) => Promise<SqlMigrationAwareDriverAdapterFactory> |
No | none |
Example using the Prisma ORM LibSQL driver adapter:
import type { PrismaConfig } from "prisma";
export default {
experimental: {
studio: true
},
studio: {
adapter: async (env: Env) => {
const { PrismaLibSQL } = await import("@prisma/adapter-libsql");
const { createClient } = await import("@libsql/client");
const libsql = createClient({
url: env.DOTENV_PRISMA_STUDIO_LIBSQL_DATABASE_URL,
});
return new PrismaLibSQL(libsql);
},
},
} satisfies PrismaConfig;tables.external and enums.external
These options declare tables and enums in your database that are managed externally (not by Prisma Migrate). You can still query them with Prisma Client, but they will be ignored by migrations.
| Property | Type | Required | Default |
|---|---|---|---|
tables.external |
string[] |
No | [] |
enums.external |
string[] |
No | [] |
Example:
import { defineConfig } from "prisma/config";
export default defineConfig({
experimental: {
externalTables: true,
},
tables: {
external: ["public.users"],
},
enums: {
external: ["public.role"],
},
});Learn more about the externalTables feature here.
migrations.path
The path to the directory where Prisma should store migration files, and look for them.
| Property | Type | Required | Default |
|---|---|---|---|
migrations.path |
string |
No | none |
migrations.seed
This option allows you to define a script that Prisma runs to seed your database after running migrations or using the npx prisma db seed command. The string should be a command that can be executed in your terminal, such as with node, ts-node, or tsx.
| Property | Type | Required | Default |
|---|---|---|---|
migrations.seed |
string |
No | none |
Example:
import { defineConfig } from "prisma/config";
export default defineConfig({
migrations: {
seed: `tsx db/seed.ts`,
},
});migrations.initShadowDb
This option allows you to define SQL statements that Prisma runs on the shadow database before creating migrations. It is useful when working with external managed tables, as Prisma needs to know about the structure of these tables to correctly generate migrations.
| Property | Type | Required | Default |
|---|---|---|---|
migrations.initShadowDb |
string |
No | none |
Example:
import { defineConfig } from "prisma/config";
export default defineConfig({
experimental: {
externalTables: true,
},
tables: {
external: ["public.users"],
},
migrations: {
initShadowDb: `
CREATE TABLE public.users (id SERIAL PRIMARY KEY);
`,
},
});Learn more about the externalTables feature here.
views.path
The path to the directory where Prisma should look for the SQL view definitions.
| Property | Type | Required | Default |
|---|---|---|---|
views.path |
string |
No | none |
typedSql.path
The path to the directory where Prisma should look for the SQL files used for generating typings via typedSql.
| Property | Type | Required | Default |
|---|---|---|---|
typedSql.path |
string |
No | none |
experimental
Enables specific experimental features in the Prisma CLI.
| Property | Type | Required | Default |
|---|---|---|---|
adapter |
boolean |
No | false |
externalTables |
boolean |
No | false |
studio |
boolean |
No | false |
Example:
import { defineConfig } from "prisma/config";
export default defineConfig({
experimental: {
adapter: true,
externalTables: true,
studio: true,
},
schema: "prisma/schema.prisma",
});:::note
If you use features like adapter, studio or externalTables without enabling the corresponding experimental flag, Prisma will throw an error:
Failed to load config file "~" as a TypeScript/JavaScript module. Error: Error: The `studio` configuration requires `experimental.studio` to be set to `true`.
:::
Common patterns
Setting up your project
To get started with Prisma Config, create a prisma.config.ts file in your project root. You can use either of these approaches:
Using defineConfig:
import { defineConfig } from "prisma/config";
export default defineConfig({});Using TypeScript types:
import type { PrismaConfig } from "prisma";
export default {} satisfies PrismaConfig;Using environment variables
When using prisma.config.ts, environment variables from .env files are not automatically loaded. You'll need to:
- Install the
dotenvpackage:
npm install dotenv
- Import
dotenv/configin your config file:
import "dotenv/config";
import type { PrismaConfig } from "prisma";
export default {
// now you can use process.env variables
} satisfies PrismaConfig;Using multi-file schemas
If you want to split your Prisma schema into multiple files, you need to specify the path to your Prisma schema folder via the schema property:
import path from "node:path";
import type { PrismaConfig } from "prisma";
export default {
schema: path.join("prisma", "schema"),
} satisfies PrismaConfig;In that case, your migrations directory must be located next to the .prisma file that defines the datasource block.
For example, assuming schema.prisma defines the datasource, here's how how need to place the migrations folder:
# `migrations` and `schema.prisma` are on the same level
.
├── migrations
├── models
│ ├── posts.prisma
│ └── users.prisma
└── schema.prisma
Path resolution
Prisma CLI commands such as prisma validate or prisma migrate use prisma.config.ts (or .config/prisma.ts) to locate your Prisma schema and other resources.
Key rules:
- Paths defined in the config file (e.g.,
schema,migrations) are always resolved relative to the location of the config file, not where you run the CLI command from. - The CLI must first find the config file itself, which depends on how Prisma is installed and the package manager used.
Behavior with pnpm prisma
When Prisma is installed locally and run via pnpm prisma, the config file is detected automatically whether you run the command from the project root or a subdirectory.
Example project tree:
.
├── node_modules
├── package.json
├── prisma-custom
│ └── schema.prisma
├── prisma.config.ts
└── src
Example run from the project root:
pnpm prisma validate
# → Loaded Prisma config from ./prisma.config.ts
# → Prisma schema loaded from prisma-custom/schema.prismaExample run from a subdirectory:
cd src
pnpm prisma validate
# → Still finds prisma.config.ts and resolves schema correctlyBehavior with npm exec prisma or bun prisma
When running via npm exec prisma or bun prisma, the CLI only detects the config file if the command is run from the project root (where package.json declares Prisma).
Example run from the project root:
npm exec prisma validate
# → Works as expectedRun from a subdirectory (fails):
cd src
npm exec prisma validate
# → Error: Could not find Prisma Schema...To fix this, you can use the --config flag:
npm exec prisma -- --config ../prisma.config.ts validateGlobal Prisma installations
If Prisma is installed globally (npm i -g prisma), it may not find your prisma.config.ts or prisma/config module by default.
To avoid issues:
- Prefer local Prisma installations in your project.
- Or use
@prisma/configlocally and pass--configto point to your config file.
Monorepos
- If Prisma is installed in the workspace root,
pnpm prismawill detect the config file from subdirectories. - If Prisma is installed in a subpackage (e.g.,
./packages/db), run commands from that package directory or deeper.
Custom config location
You can specify a custom location for your config file when running Prisma CLI commands:
prisma validate --config ./path/to/myconfig.ts
|
I refactored the Prisma configuration by creating a dedicated
Learn more about Cursor Agents |
Co-authored-by: me <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (2)
prisma.config.ts (1)
8-22: Cross-file: ensure schema generator uses the Rust‑free settings with driver adapters.Given the move to driver adapters, verify your
prisma/schema.prismauses the modern settings (recommended):
generator client { provider = "prisma-client"; engineType = "client"; output = "../src/generated/prisma" }Docs state Rust‑free mode requires
engineType = "client"and a driver adapter. If your schema still hasengineType = "library", consider updating. (prisma.io)package.json (1)
207-207: Prisma v6 engines vs Node 24: double‑check runtime matrix.Prisma v6 documents minimum supported Node versions (18.18, 20.9, 22.11). Node 24 isn’t listed; it may work but isn’t explicitly guaranteed. If your
engines.nodeis24, consider testing on Node 22 LTS too or relaxing engines. (prisma.io)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
package.json(4 hunks)prisma.config.ts(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: ⬣ ESLint
- GitHub Check: 🎭 Playwright
- GitHub Check: ʦ TypeScript
🔇 Additional comments (5)
prisma.config.ts (2)
12-16: migrations config looks correct; confirm seed command resolution.
migrations.pathrelative to the config file is supported, andmigrations.seedaccepts a shell command. Please confirmtsx other/runfile prisma/seed.tsresolves from project root in CI. (prisma.io)
9-11: Experimental adapter flag: LGTM.Enabling
experimental.adapteris required when supplying an adapter via Prisma Config. (prisma.io)package.json (3)
62-63: Version alignment across Prisma packages: good—keep them in lockstep.
@prisma/adapter-better-sqlite3and@prisma/clientare both^6.16.3. Keepprisma(CLI) on the same minor to avoid mismatches. (prismagraphql.com)
87-87: Node 24 compatibility note for better‑sqlite3.
better-sqlite3v12 added Node 24 support, so^12.4.1is appropriate. Be aware native prebuilds vary by platform/ABI—CI should catch rebuild needs. (github.com)
175-175: Types: LGTM.
@types/better-sqlite3addition aligns with the driver. No issues.
kentcdodds
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cursor, I don't think we need cache.db files committed to the repo. Could you remove that please?
Also, I pulled down your changes and ran npx prisma migrate reset --force and got the following output:
Loaded Prisma config from prisma.config.ts.
Prisma config detected, skipping environment variable loading.
Prisma schema loaded from prisma/schema.prisma
Datasource "db": SQLite database "sqlite.db" using driver adapter "@prisma/adapter-better-sqlite3"
WARNING: Your schema specifies the following datasource properties but you are using a Driver Adapter via prisma.config.ts:
- url
The values from your schema will NOT be used!
We recommend you to remove those properties from your schema to avoid confusion if you are only using driver adapters.
Database reset successful
The following migration(s) have been applied:
migrations/
└─ 20221111214533_init/
└─ migration.sql
└─ 20221122174558_postread_indexes/
└─ migration.sql
└─ 20230520220040_tuned_indexes/
└─ migration.sql
└─ 20250206200815_passkey/
└─ migration.sql
└─ 20250221203759_convert_kit/
└─ migration.sql
✔ Generated Prisma Client (v6.16.3) to ./node_modules/@prisma/client in 30ms
Running seed command `tsx other/runfile prisma/seed.ts` ...
PrismaClientInitializationError:
Invalid `prisma.user.upsert()` invocation in
/Users/kentcdodds/code/kentcdodds.com/prisma/seed.ts:7:33
4 const prisma = new PrismaClient()
5
6 async function main() {
→ 7 const kent = await prisma.user.upsert(
Error querying the database: Error code 14: Unable to open the database file
at ei.handleRequestError (/Users/kentcdodds/code/kentcdodds.com/node_modules/@prisma/client/src/runtime/RequestHandler.ts:242:13)
at ei.handleAndLogRequestError (/Users/kentcdodds/code/kentcdodds.com/node_modules/@prisma/client/src/runtime/RequestHandler.ts:174:12)
at ei.request (/Users/kentcdodds/code/kentcdodds.com/node_modules/@prisma/client/src/runtime/RequestHandler.ts:143:12)
at async a (/Users/kentcdodds/code/kentcdodds.com/node_modules/@prisma/client/src/runtime/getPrismaClient.ts:833:24)
at async main (/Users/kentcdodds/code/kentcdodds.com/prisma/seed.ts:7:15) {
clientVersion: '6.16.3',
errorCode: undefined,
retryable: undefined
}
An error occurred while running the seed command:
Error: Command failed with exit code 1: tsx other/runfile prisma/seed.ts
Could you handle both the error and the warning?
Additionally, I noticed that as I run things, new files are created under prisma:
$ tree prisma
prisma
├── migrations
│ ├── 20221111214533_init
│ │ └── migration.sql
│ ├── 20221122174558_postread_indexes
│ │ └── migration.sql
│ ├── 20230520220040_tuned_indexes
│ │ └── migration.sql
│ ├── 20250206200815_passkey
│ │ └── migration.sql
│ ├── 20250221203759_convert_kit
│ │ └── migration.sql
│ └── migration_lock.toml
├── schema.prisma
├── seed-utils.ts
├── seed.ts
├── sqlite.db
├── sqlite.db?connection_limit=1 <-- this is new
└── sqlite.db?connection_limit=1-journal <-- this is new
I don't think we should have those new files. My .env has the following content:
DATABASE_FILENAME="sqlite.db"
DATABASE_URL="file:./prisma/sqlite.db?connection_limit=1"
CACHE_DATABASE_PATH="other/cache.db"
LITEFS_DIR="./prisma"
Maybe I need to remove the ?connection_limit=1 and update the .gitignore to ignore the journal file? Could you check the .env.example and update those if that's the case? We may need to update the envs in the Dockerfile/litefs.yml files as well.
|
I significantly streamlined the
5 tasks completed
Learn more about Cursor Agents |
Co-authored-by: me <[email protected]>
kentcdodds
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cursor, you changed WAY too much in the .env.example. Please revert that change and only make the minimal updates necessary for this prisma migration.
|
I significantly expanded the
Learn more about Cursor Agents |
Co-authored-by: me <[email protected]>
Co-authored-by: me <[email protected]>
kentcdodds
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cursor, please delete the cache.db and remove it from git.
Also, please try to run npx prisma migrate reset --force yourself and fix things. Here's what I'm getting when I run it with your changes.
$ npx prisma migrate reset --force
Loaded Prisma config from prisma.config.ts.
Prisma config detected, skipping environment variable loading.
Prisma schema loaded from prisma/schema.prisma
Datasource "db": SQLite database "sqlite.db" using driver adapter "@prisma/adapter-better-sqlite3"
WARNING: Your schema specifies the following datasource properties but you are using a Driver Adapter via prisma.config.ts:
- url
The values from your schema will NOT be used!
We recommend you to remove those properties from your schema to avoid confusion if you are only using driver adapters.
Database reset successful
The following migration(s) have been applied:
migrations/
└─ 20221111214533_init/
└─ migration.sql
└─ 20221122174558_postread_indexes/
└─ migration.sql
└─ 20230520220040_tuned_indexes/
└─ migration.sql
└─ 20250206200815_passkey/
└─ migration.sql
└─ 20250221203759_convert_kit/
└─ migration.sql
✔ Generated Prisma Client (v6.16.3) to ./node_modules/@prisma/client in 34ms
Running seed command `tsx other/runfile prisma/seed.ts` ...
PrismaClientKnownRequestError:
Invalid `prisma.user.upsert()` invocation in
/Users/kentcdodds/code/kentcdodds.com/prisma/seed.ts:12:33
9 })
10
11 async function main() {
→ 12 const kent = await prisma.user.upsert(
Raw query failed. Code: `InvalidArg`. Message: `unknown variant `SocketTimeout`, expected one of `GenericJs`, `UnsupportedNativeDataType`, `InvalidIsolationLevel`, `LengthMismatch`, `UniqueConstraintViolation`, `NullConstraintViolation`, `ForeignKeyConstraintViolation`, `DatabaseNotReachable`, `DatabaseDoesNotExist`, `DatabaseAlreadyExists`, `DatabaseAccessDenied`, `ConnectionClosed`, `TlsConnectionError`, `AuthenticationFailed`, `TransactionWriteConflict`, `TableDoesNotExist`, `ColumnNotFound`, `TooManyConnections`, `ValueOutOfRange`, `MissingFullTextSearchIndex`, `TransactionAlreadyClosed`, `postgres`, `mysql`, `sqlite`, `mssql``
at ei.handleRequestError (/Users/kentcdodds/code/kentcdodds.com/node_modules/@prisma/client/src/runtime/RequestHandler.ts:228:13)
at ei.handleAndLogRequestError (/Users/kentcdodds/code/kentcdodds.com/node_modules/@prisma/client/src/runtime/RequestHandler.ts:174:12)
at ei.request (/Users/kentcdodds/code/kentcdodds.com/node_modules/@prisma/client/src/runtime/RequestHandler.ts:143:12)
at async a (/Users/kentcdodds/code/kentcdodds.com/node_modules/@prisma/client/src/runtime/getPrismaClient.ts:833:24)
at async main (/Users/kentcdodds/code/kentcdodds.com/prisma/seed.ts:12:15) {
code: 'P2010',
meta: {
modelName: 'User',
code: 'InvalidArg',
message: 'unknown variant `SocketTimeout`, expected one of `GenericJs`, `UnsupportedNativeDataType`, `InvalidIsolationLevel`, `LengthMismatch`, `UniqueConstraintViolation`, `NullConstraintViolation`, `ForeignKeyConstraintViolation`, `DatabaseNotReachable`, `DatabaseDoesNotExist`, `DatabaseAlreadyExists`, `DatabaseAccessDenied`, `ConnectionClosed`, `TlsConnectionError`, `AuthenticationFailed`, `TransactionWriteConflict`, `TableDoesNotExist`, `ColumnNotFound`, `TooManyConnections`, `ValueOutOfRange`, `MissingFullTextSearchIndex`, `TransactionAlreadyClosed`, `postgres`, `mysql`, `sqlite`, `mssql`'
},
clientVersion: '6.16.3'
}
An error occurred while running the seed command:
Error: Command failed with exit code 1: tsx other/runfile prisma/seed.ts
|
I performed a database cleanup by removing an old cache file and enhanced the database seeding process. I added a fallback URL for the Prisma SQLite adapter, improving development setup robustness.
3 tasks completed Learn more about Cursor Agents |
Co-authored-by: me <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 7 out of 9 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This reverts commit 1a73854.
Upgrade Prisma to v6 and integrate the Better SQLite3 driver adapter to improve compatibility and reduce binary size.
Note
Upgrade to Prisma v6 with Better SQLite3, generate Prisma client into app/utils/prisma-generated.server, update imports/usages across app, tests, seeds, and adjust WebAuthn key storage and env/ignores.
prisma.config.tswith experimental adapter, migrations config, and seeding; switch generator toprisma-client(library) outputting toapp/utils/prisma-generated.server.@prisma/clientimports with#app/utils/prisma-generated.server/client.ts; add@prisma/adapter-better-sqlite3andbetter-sqlite3; enforceDATABASE_URLand set adapter when instantiatingPrismaClient.prisma/seed.ts,prisma/seed-utils.ts) and types (types/index.d.ts) to new client path.@prisma/clientandprismato v6; add related type packages..gitignoreand ESLint (eslint.config.js).Passkey.publicKeyasUint8Arrayinapp/routes/resources+/webauthn+/verify-registration.ts.DATABASE_URLtofile:./prisma/sqlite.db; minor script tweak forcurl:blog.Written by Cursor Bugbot for commit 250b67f. This will update automatically on new commits. Configure here.
Summary by CodeRabbit
Bug Fixes
Chores